package com.pdk.server;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.net.Socket;

import net.sf.json.JSONObject;

public class Client {
	static int[] values = new int[] { 2, 2, 3, 3 };
	
	public static void main(String[] args) throws Exception {
		JSONObject js = new JSONObject();
		js.put("id", 0);
		js.put("method", "hall");
		System.out.println(js.toString());;
		Socket client = new Socket("10.0.0.196", 5555);
		DataOutputStream dout = new DataOutputStream(client.getOutputStream());
		DataInputStream din = new DataInputStream(client.getInputStream());
		dout.writeUTF(js.toString());
		while (true) {
			String message = din.readUTF();
			System.out.println("message" + message);
		}
	}
}
